<div class="refund-no">
  <!--确认弹窗-->
  <p-confirmDialog acceptLabel="确认" rejectLabel="取消"></p-confirmDialog>
  <!--消息提示-->
  <p-messages  [closable]="true" [style]="{'position':'fixed','left': '10vw', 'top': '0','margin-top': '0','width': '100vw','z-index':'9999'}"></p-messages>
  <!--顶部按钮-->
  <div class="refund-no-header">
    <div class=" ui-g-12">
      <!--<div class="ui-g-1 refund-no-header-btn refund-no-header-btn-add" (click)="refundNoAddClick()">-->
      <!--<img class="refund-no-header-img-add" src="assets/images/ic_add.png" alt="">-->
      <!--<span>增 加</span>-->
      <!--</div>-->
      <!--<div class="ui-g-1 refund-no-header-btn refund-no-header-btn-modify" (click)="refundNoModifyClick()">-->
      <!--<img class="refund-no-header-img-modify" src="assets/images/ic_modify.png" alt="">-->
      <!--<span>修 改</span>-->
      <!--</div>-->
      <!--<div class="ui-g-1 refund-no-header-btn refund-no-header-btn-delete" (click)="refundNoDeleteClick()">-->
      <!--<img class="refund-no-header-img-delete" src="assets/images/ic_delete.png" alt="">-->
      <!--<span>删 除</span>-->
      <!--</div>-->
      <div style="margin-top: 4.5vh;font-size: 0.875rem;margin-left: 1vw">
        <label style="color: #fff;margin-left: 0.5vw" >小区：</label>
        <p-dropdown [options]="SearchOption.village"  scrollHeight="100px" placeholder="请选择小区..." (onChange)="VillageChange($event)"></p-dropdown>
        <label style="color: #fff;margin-left: 0.5vw">地块：</label>
        <p-dropdown [options]="SearchOption.region" scrollHeight="100px" placeholder="请选择地块..." (onChange)="regionChange($event)"></p-dropdown>
        <label style="color: #fff;margin-left: 0.5vw">楼栋：</label>
        <p-dropdown [options]="SearchOption.building"  scrollHeight="100px" placeholder="请选择楼栋..." (onChange)="buildingChange($event)"></p-dropdown>
        <label style="color: #fff;margin-left: 0.5vw">单元：</label>
        <p-dropdown [options]="SearchOption.unit"   scrollHeight="100px" placeholder="请选择单元..." (onChange)="unitChange($event)"></p-dropdown>
      </div>
    </div>
    <!--//搜索-->
    <div class="ui-inputgroup refund-no-header-search">
      <input type="text" pInputText placeholder="请输入缴费人" #input style="width: 7vw">
      <button id="disabled-btn" class="refund-no-header-btn-search" type="button"  (click)="refundNoSearchClick()"  label="搜索">搜索</button>
    </div>
  </div>
  <!--表格-->
  <div class="refund-no-table">
    <p-scrollPanel [style]="{width:'100%',height: '90%'}" styleClass="custombar">
      <p-table [columns]="refundNoTableTitle" [value]="refundNoTableContent"  [(selection)]="refundNoSelect" (onRowSelect)="refundNoonRowSelect($event)">
        <ng-template pTemplate="header" let-columns>
          <tr >
            <th style="width: 3em"  [ngStyle]="this.refundNoTableTitleStyle">
              <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
            </th>
            <th *ngFor="let col of columns"  [ngStyle]="this.refundNoTableTitleStyle">
              {{col.header}}
            </th>
            
          </tr>
        </ng-template>
        <ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=1" [ngStyle]="{'background':'#33353C','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns.slice(0,columns.length-1);" >
              {{rowData[col.field]}}
            </td>
            <td>
              <button class="refund-no-table-Btn refund-no-table-Btn-detail" (click)="refundNoDetailClick(rowData)" >详情</button>
              <span *ngIf="rowData.refundStatus !== 0">
                <button class="refund-no-table-Btn refund-no-table-Btn-Refund" style="background: #747474"  (click)="InfoRefundClick(rowData)"  [disabled]="rowData.refundStatus !== 0">退款申请</button>
              </span>
              <span *ngIf="rowData.refundStatus === 0">
                <button class="refund-no-table-Btn refund-no-table-Btn-Refund" (click)="InfoRefundClick(rowData)" >退款申请</button>
              </span>
            </td>
          </tr>
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=0" [ngStyle]="{'background':'#2E3037','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns.slice(0,columns.length-1);" >
              {{rowData[col.field]}}
            </td>
            <td>
              <button class="refund-no-table-Btn refund-no-table-Btn-detail" (click)="refundNoDetailClick(rowData)" >详情</button>
              <span *ngIf="rowData.refundStatus !== 0">
                <button class="refund-no-table-Btn refund-no-table-Btn-Refund" style="background: #747474" (click)="InfoRefundClick(rowData)" aria-disabled="true"  [disabled]="rowData.refundStatus !== 0">退款申请</button>
              </span>
              <span *ngIf="rowData.refundStatus === 0">
                <button class="refund-no-table-Btn refund-no-table-Btn-Refund" (click)="InfoRefundClick(rowData)" >退款申请</button>
              </span>
            </td>
          </tr>
        </ng-template>
      </p-table>
    </p-scrollPanel>

  </div>
  <p-dialog header="详细信息" [(visible)]="refundNoDetailDialog" [width]="900">
    <!--Content-->
    <p-scrollPanel [style]="{width:'100%',height: '70vh'}" styleClass="custombar">
      <div class="ui-g ui-fluid" [ngStyle]="{'line-height':'4vh'}">
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label >组织名称：</label>
          </div>
          <div class="ui-g-8">
            <span>{{refundNoDetail.organizationName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label >小区名称：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.villageName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>地块名称：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.regionName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>楼栋：</label>
          </div>
          <div class="ui-g-8">
            <span>{{refundNoDetail.buildingName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>单元名称：</label>
          </div>
          <div class="ui-g-8">
            <span>{{refundNoDetail.unitName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>房屋编号：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.roomCode}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>客户名称：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.surname}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>住房大小：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.roomSize}}平米</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>项目名称：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.chargeName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>实收金额：</label>
          </div>
          <div class="ui-g-8" >
            <span>￥{{refundNoDetail.actualMoneyCollection}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>抵扣金额：</label>
          </div>
          <div class="ui-g-8" >
            <span>￥{{refundNoDetail.mortgageAmount}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>抵扣原因：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.reasonForDeduction}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>可退还金额：</label>
          </div>
          <div class="ui-g-8" >
            <span>￥{{refundNoDetail.refundableAmount}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>收费单位：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.chargeUnit}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>缴费人手机号：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.payerPhone}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>缴费人姓名：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.payerName}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>支付方式：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.paymentMethod}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>支付类型：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{paymentTypeDetail}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>退款状态：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundStatusDetail}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>开始时间：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.startTime}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>结束日期：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.dueTime}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>延迟时长：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.delayTime}}天</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>延期原因：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.delayReason}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>责任人：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.personLiable}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>责任人电话：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.personLiablePhone}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>负责机构：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.responsibleAgencies}}</span>
          </div>
        </div>
        <div class="ui-g-6">
          <div class="ui-g-4">
            <label>申请退款备注：</label>
          </div>
          <div class="ui-g-8" >
            <span>{{refundNoDetail.remark}}</span>
          </div>
        </div>
      </div>
    </p-scrollPanel>

    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-sure" (click)="refundReviewModifySureClick()">确认</button>-->
        <button class="refund-no-dialog-Btn refund-no-dialog-Btn-false"  (click)="refundNoDetailDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <p-dialog header="退款申请" [(visible)]="RefundDialog" [width]="600" >
    <!--Content-->
    <div class="ui-g ui-fluid" style="line-height: 4vh">
      <!--报表显示数据-->
      <div class="ui-g-12">
        <div class="ui-g-2"></div>
        <div class="ui-g-3">
          <span>退还金额:</span>
        </div>
        <div class="ui-g-6">
          <span>￥{{ApplicationRefund.refundableAmount}}</span>
        </div>
        <div class="ui-g-2"></div>
      </div>
      <div class="ui-g-12">
        <div class="ui-g-2"></div>
        <div class="ui-g-3">
          <span>实收金额:</span>
        </div>
        <div class="ui-g-6">
          <span>￥{{ApplicationRefund.actualMoneyCollection}}</span>
        </div>
        <div class="ui-g-2"></div>
      </div>
      <div class="ui-g-12">
        <div class="ui-g-2"></div>
        <div class="ui-g-3">
          <span>扣款原因:</span>
        </div>
        <div class="ui-g-6">
          <span>{{refundReason}}</span>
        </div>
        <div class="ui-g-2"></div>
      </div>
      <div class="ui-g-12">
        <div class="ui-g-2"></div>
        <div class="ui-g-3">
          <span>退还银行卡金额:</span>
        </div>
        <div class="ui-g-6">
          <input type="text" pInputText placeholder="请输入退款金额" [(ngModel)]="ApplicationRefund.transferCardAmount" (blur)="transferCardAmountChange()">
        </div>
        <div class="ui-g-2"></div>
      </div>
      <div class="ui-g-12">
        <div class="ui-g-2"></div>
        <div class="ui-g-3">
          <span>抵扣物业费金额:</span>
        </div>
        <div class="ui-g-6">
          <input type="text" pInputText placeholder="请输入抵扣物业费金额" [(ngModel)]="ApplicationRefund.deductionPropertyFee">
        </div>
        <div class="ui-g-2"></div>
      </div>
      <div class="ui-g-12" [ngStyle]="{'line-height':'2vh'}">
        <div class="ui-g-2"></div>
        <div class="ui-g-3">
          <span>备注:</span>
        </div>
        <div class="ui-g-6">
          <textarea type="text" pInputText placeholder="请输入备注..." [(ngModel)]="ApplicationRefund.remark"></textarea>
        </div>
        <div class="ui-g-2"></div>
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button class="refund-no-dialog-Btn refund-no-dialog-Btn-sure" (click)="refundSureClick()">确 认</button>
        <button class="refund-no-dialog-Btn refund-no-dialog-Btn-false" (click)="RefundDialog = false;clearData()">取 消</button>
      </div>
    </p-footer>
  </p-dialog>
  <rbi-paging [option]="option" (pageClick)="nowpageEventHandle($event)"></rbi-paging>
  <rbi-loading [hidden]="loadHidden" style="position: absolute;left: 45vw;top:40vh;z-index: 99999"></rbi-loading>
</div>
